/**
 * InformationPanelSingleton.java
 *
 * @author Beatrice Bacelli
 * @author Luca Bedogni
 * @author Silvia Righini
 */
package unibo.lsb.graphic;

/**
 * Singleton for {@link InformationPanel}
 */
public class InformationPanelSingleton {

	private static InformationPanelSingleton ips;
	private static InformationPanel informationPanel;

	private InformationPanelSingleton() {
		informationPanel = new InformationPanel();
	}

	public static InformationPanel getInformationPanel() {
		return informationPanel;
	}

	public static InformationPanelSingleton getInstance() {
		if (ips == null) {
			ips = new InformationPanelSingleton();
		}
		return ips;
	}

	public static void closeGame() {
		informationPanel = null;
	}

}
